package com.zmn.oms.persistence.interfaces.fcorderpart;

import com.zmn.oms.model.entity.fcorderpart.OrderFactoryPartPost;
import com.zmn.oms.model.entity.fcorderpart.OrderFactoryPartPostQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderFactoryPartPostDao {

    List<OrderFactoryPartPost> listEsOrderFactoryPartPostByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

    List<OrderFactoryPartPost> listOrderFactoryPartPostByOrderId(Long orderId);

    List<OrderFactoryPartPost> findByFcOrderPartId(Integer fcOrderPartId);

    int deleteByPrimaryKey(Integer postId);

    int insert(OrderFactoryPartPost record);

    int insertSelective(OrderFactoryPartPost record);

    OrderFactoryPartPost selectByPrimaryKey(Integer postId);

    int updateByPrimaryKeySelective(OrderFactoryPartPost record);

    int updateByPrimaryKey(OrderFactoryPartPost record);

    void deleteByOrderId(Long orderId);

    void deleteByOrderIdAndPostType(@Param("orderId") Long orderId, @Param("postType") Integer postType);

    void deleteByFcOrderPartId(Integer fcOrderPartId);

    void deleteByFcOrderPartIds(@Param("fcOrderPartIds") List<Integer> fcOrderPartIds);

    List<OrderFactoryPartPost> listByPostIds(List<String> list);

    List<OrderFactoryPartPost> listByPartId(Integer fcOrderPartId);

    List<OrderFactoryPartPost> listByQuery(OrderFactoryPartPostQuery factoryPartQuery);

    int findOldPartPostCount(Long orderId);

    void deleteSend(Integer fcOrderPartId);

    void updatePostStatus(OrderFactoryPartPost orderFactoryPartPost);

    void deleteReturn(Integer fcOrderPartId);

    List<OrderFactoryPartPost> listByExpressCode(String expressCode);

    List<OrderFactoryPartPost> listForOrderPart(OrderFactoryPartPostQuery factoryPartQuery);

    OrderFactoryPartPost findOrderIdByExpressCodeAndExpressCompanyCode(@Param("expressCode") String expressCode, @Param("expressCompanyCode") String expressCompanyCode);
}